﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EvidenceManagement.Logic.Security
{
    public class SecurityPolicyNotInitializedException:Exception
    {
        readonly string policyName;

        public SecurityPolicyNotInitializedException()
        {

        }

        public SecurityPolicyNotInitializedException(string policyName)
        {
            this.policyName = policyName;
        }

        public override string Message
        {
            get
            {
                return string.Format("Security policy{0}has not been initialized. Create initialized security policy using SecurityPolicyManager.CreatePolicy(string)", string.IsNullOrEmpty(policyName) ? " " : string.Concat(" '", policyName, "' "));               
            }
        }
    }
}
